import { Redirect } from 'react-router-dom'

import Home from 'pages/Home'
import CityList from 'pages/CityList'
import MapPage from 'pages/MapPage'

import Index from 'pages/Home/Index/index'
import Rent from 'pages/Home/Rent'
import News from 'pages/Home/News'
import Profile from 'pages/Home/Profile'



export const routes = [
  {
    path: '/',
    exact: true,
    render: () => <Redirect to="/home"/>
  },
  {
    path:'/home',
    component:Home,
    routes:[
      {
        path:'/home',
        component:Index,
        exact:true
      },
      {
        path:'/home/rent',
        component:Rent
      },
      {
        path:'/home/news',
        component:News
      },
      {
        path:'/home/profile',
        component:Profile
      }
    ]
  },
  {
    path:'/citylist',
    component:CityList
  },
  {
    path:'/map',
    component:MapPage
  }
]